define(['jquery'], () => {
    function fn() {
        //当前模块实现某项功能的代码
        //选项卡
        let xuan = document.querySelector('.xuan')
        let xiang = document.querySelectorAll('.xiang')
        let xia = document.querySelectorAll('.xia')
        let state=false
        xuan.addEventListener('click', function (e) {

            e = e || window.event
            let target = e.target || e.srcElement
            for (let i = 0; i < xiang.length; i++) {
                xiang[i].style.color = '#1c9085'
                xia[i].style.display='none'
            }
            target.style.color = 'red'
            target.nextElementSibling.style.display = 'block'
            return false
        })
        let user=location.search.slice(10)
        if(user!=''){
            let yonghu=document.querySelector('.yonghu')
            yonghu.innerHTML='用户：'+user
        }
    }
    //返回函数名称，将函数调用的控制权交给main.js文件中
    return {
        fn: fn
    }
})